06d168f5cfee0b485380d9f49ea13fd4185058c6,server/src/test/java/org/candlepin/controller/PoolManagerTest.java,PoolManagerTest,testRefreshPoolsSkipsOrphanedStackDerivedPools,#,604
Before Change
public void testRefreshPoolsSkipsOrphanedStackDerivedPools() {
List<Subscription> subscriptions = Util.newList();
List<Pool> pools = Util.newList();
Pool p = TestUtil.createPool(TestUtil.createProduct());
p.setSourceSubscription(new SourceSubscription("112", "master"));
// Mock a pool with a source stack ID:
After Change
public void testRefreshPoolsSkipsOrphanedStackDerivedPools() {
List<Subscription> subscriptions = Util.newList();
List<Pool> pools = Util.newList();
Product product = TestUtil.createProduct();
Pool p = TestUtil.createPool(product);
p.setSourceSubscription(new SourceSubscription("112", "master"));
// Mock a pool with a source stack ID:
p.setAttribute("pool_derived", "true");
p.setSourceStack(new SourceStack(new Consumer(), "blah"));
p.setSourceEntitlement(null);
pools.add(p);
mockSubsList(subscriptions);
mockPoolsList(pools);
this.mockProductImport(owner, product);
this.mockContentImport(owner, new Content[] {});
CandlepinQuery<Pool> cqmock = mock(CandlepinQuery.class);
when(cqmock.list()).thenReturn(pools);